package com.tan.lbs;

import com.tan.lbs.dao.GameDAO;
import com.tan.lbs.dao.impl.GameDAOImpl;
import com.tan.lbs.util.Constants;
import com.tan.lbs.util.ResourceReader;
import com.tan.lbs.util.URLs;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class NPCTalkingMediaActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.npctalkingmedia);
		
		Intent intent = getIntent();
		String mediaID = intent.getStringExtra("mediaID");
		
		Bitmap icon = ResourceReader.readImage(this,
				URLs.gameResourceLoc + getSharedPreferences(Constants.PREFS_NAME, 0).getString("currentGameID", "") + "/"
						+ mediaID);

		ImageView itemIcon = (ImageView)findViewById(R.id.npcMediaImg);
		itemIcon.setImageBitmap(icon);
		
		((Button)findViewById(R.id.npcMediaBackGameBtn)).setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				finish();
			}
			
		});
	}
}
